import LmModal from "./index.vue"
console.log(LmModal, 'LmModal')
export default {
    install(Vue) {
        function generateInstance(options) {
            const Ctor = createConstructor(options)
            let instance = new Ctor({
                propsData: options
            }).$mount(document.createElement("div"))
            
        }

        function createConstructor(options) {
            LmModal.components.TempComponent = options.template;
            return Vue.extend(LmModal)
        }

        Vue.prototype.$modal = function (options) {
            generateInstance(options)
        }
    }
}